Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 4 - Printing Messages / Printing Messages Reference
Printing Messages / Universal Imaging Messages


GXCreateImageFile

QuickDraw GX sends the GXCreateImageFile message before the imaging of a print job begins. You need to override the GXCreateImageFile message if your device requires that an image file be created. Your override of the GXCreateImageFile message must match the following formal declaration:

OSErr MyCreateImageFile (FSSpecPtr aFSSpecPtr, 
                        long imageFileOptions, 
                        long *fileReference);
aFSSpecPtr
Where to create the image file.
imageFileOptions
Options for creation of the image file, as shown in Table 4-7.
fileReference
On return, this value specifies a reference to the created image file.
function result
An error code. The value noErr indicates that the operation was successful.
DESCRIPTION
You need to override the GXCreateImageFile message if you are working with an output device that needs to be driven from a file. For example, a film recorder might need to process all of the data for a single image plane at once, due to hardware timing constraints. Or a facsimile machine might need to receive the data for a page without lengthy interruptions that indicate a disconnection. For devices with constraints like these, you need to send the printer data to a file that is subsequently streamed to the device.

When you create an imaging file, QuickDraw GX stores the printing data and plays it back to the output device in a steady stream. The options that you specify in the imageFileOptions parameter define how the playback occurs, as shown in Table 4-7.

The default implementation of this message creates the image file if the options specify that it should.
Table 4-7 Image file options
ConstantValueExplanation
gxNoImageFile0The function does not create an image file. This is the default value.
gxMakeImageFile1The function creates an image file.
gxEachPlane2The function stores one image plane of data at a time. This allows a device like a film recorder to process each image plane of a data without pausing.
gxEachPage4The function stores one page of data at a time. This allows a device to process each page without pausing.
gxEntireFile6The function stores the entire document to allow the device to process the document without pausing.

SPECIAL CONSIDERATIONS
You never send the GXCreateImageFile message yourself.

You must forward the GXCreateImageFile message to other message handlers. You can modify the options and then forward the message.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found,
or there was not enough memory to load it.
gxPrUserAbortErrThe user has canceled printing.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help